export function debounce(fn, delay) {
    // 记录上⼀次的延时器
    var timer = null;
    var delay = delay || 200;
    return function() {
        var args = arguments;
        var that = this;
        // 清除上⼀次延时器
        clearTimeout(timer)
        timer = setTimeout(function() {
            fn.apply(that,args)
        }, delay);
    }
}